package com.example.backend;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class WeaponService {

    @Autowired
    @Qualifier("gameMessageJdbcTemplate")
    private JdbcTemplate jdbcTemplate;

    public void insertWeaponsLevels(String[] weapons) {
        for (String weapon : weapons) {
            String insertSQL = "INSERT INTO weapons_levels (weapon_name) VALUES (?)";
            jdbcTemplate.update(insertSQL, weapon);
        }
    }
}
